package me.zhengjie.minio;

import lombok.Data;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;


/**
 * @description minio配置
 * @author xiahongbo
 * @date 2022-07-13
 **/
@Configuration
@Getter
public class MinioConfig {

    //    主机地址和端口号
    public static String endPoint;

    //    主机地址和端口号
    public static String endPoint2;

    //    主机地址和端口号
    public static String endPoint3;

    //    minio的用户名
    public static String accessKey;

    //    minio的密码
    public static String secretKey;

    //    minio的密码
    public static String bucket;

    //    minio的密码
    public static String bucketFace;

    //    minio的密码
    public static String gateWay;

    @Value("${minio.endPoint}")
    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }

    @Value("${minio.endPoint2}")
    public void setEndPoint2(String endPoint2) {
        this.endPoint2 = endPoint2;
    }

    @Value("${minio.endPoint3}")
    public void setEndPoint3(String endPoint3) {
        this.endPoint3 = endPoint3;
    }

    @Value("${minio.accessKey}")
    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    @Value("${minio.secretKey}")
    public void setSecretKey(String secretKey) {
        this.secretKey = secretKey;
    }

    @Value("${minio.bucket}")
    public void setBucket(String bucket) {
        this.bucket = bucket;
    }

    @Value("${minio.bucketFace}")
    public void setBucketFace(String bucketFace) {
        this.bucketFace = bucketFace;
    }

    @Value("${minio.gateWay}")
    public void setGateWay(String gateWay) {
        this.gateWay = gateWay;
    }


    @Override
    public String toString() {
        return "WeiXinConfig [endPoint=" + endPoint + ", endPoint2=" + endPoint2 + ", accessKey=" + accessKey + ", secretKey=" + secretKey
                + ", bucket=" + bucket + ", gateWay=" + gateWay + "]";
    }
}
